package com.iwuke.dance.activity;

import android.app.Application;

import com.iwuke.dance.http_request.NetManger;
import com.tencent.mm.opensdk.openapi.IWXAPI;
import com.tencent.mm.opensdk.openapi.WXAPIFactory;

/**
 * @author: 魏从响
 * @date: 2025/9/12
 */
public class LPWHApplication extends Application {

    public static LPWHApplication lpwhApplication;//context
    private IWXAPI mWxApi;

    public static String app_id = "wx157c948fcb985618";
    public static String app_secret = "2d8a3fd9183b15208d3b7afa8b2d7407";

    @Override
    public void onCreate() {
        super.onCreate();

        lpwhApplication = this;//context
        NetManger.init(this);//网络请求

        registerWeChat();

    }

    public static LPWHApplication getContext(){
        return lpwhApplication;
    }

    private void registerWeChat() {
        mWxApi = WXAPIFactory.createWXAPI(this, app_id, true);
        mWxApi.registerApp(LPWHApplication.app_id);
    }

    public IWXAPI getWxApi() {
        return mWxApi;
    }

}
